package com.roroldo.springcloud;

import com.roroldo.myrule.MySelfRule;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.ribbon.RibbonClient;

/**
 * 消费者接口（port:80）
 * @author 落霞不孤
 */
@SpringBootApplication
@EnableEurekaClient
// 在启动该微服务的时候加载我们的自定义Ribbon策略，使配置生效
// 即服务消费方通过 MySelfRule 的策略来选择 CLOUD-PAYMENT-SERVICE 服务进行消费
@RibbonClient(name = "CLOUD-PAYMENT-SERVICE", configuration = MySelfRule.class)
public class MainApp80 {

    public static void main(String[] args) {
        SpringApplication.run(MainApp80.class, args);
    }
}
